package com.huang.app.demo5

import android.os.Bundle
import android.view.LayoutInflater
import com.alibaba.android.arouter.facade.annotation.Route
import com.huang.app.BR
import com.huang.app.R
import com.huang.app.databinding.ActivityDemo5Binding
import com.huang.mvvm.activity.BaseActivity
import com.huang.mvvm.fragment.BaseFragment
import com.huang.mvvm.vm.EmptyActivityViewModel
import com.huang.router.router.AppRouter

@Route(path = AppRouter.DEMO5_ACTIVITY)
class Demo5Activity : BaseActivity<ActivityDemo5Binding, EmptyActivityViewModel>() {
    override fun getLayoutId(inflater: LayoutInflater, savedInstanceState: Bundle?): Int =
        R.layout.activity_demo5

    override fun getViewModelId(): Int = BR.viewModel

    override fun initView() {
        super.initView()
        val rootFragment =
            AppRouter.build(AppRouter.DEMO5_ROOT_FRAGMENT).navigation() as BaseFragment<*, *>
        loadRootFragment(R.id.layoutContainer, rootFragment)
    }
}